package modele;

import java.util.List;
import java.io.Serializable;
import java.sql.Timestamp;

import javax.persistence.Basic;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Column;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.JoinColumns;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Transient;
import javax.persistence.Embeddable;

import org.codehaus.jackson.annotate.JsonIgnore;

/**
 * <p>Pojo mapping TABLE articlestock</p>
 * <p></p>
 *
 * <p>Generated at Sat Feb 26 23:34:05 CET 2011</p>
 * @author Salto-db Generator v1.0.16 / EJB3
 * 
 */
@Entity
@Table(name = "articlestock")
@SuppressWarnings("serial")
public class Articlestock implements Serializable {

	/**
	 * Attribute idArticledepot.
	 */
	private Integer idArticledepot;
	
	/**
	 * Attribute article
	 */
	 private Article article;	

	/**
	 * Attribute depot
	 */
	 private Depot depot;	

	/**
	 * Attribute asQtemini.
	 */
	private Long asQtemini;
	
	/**
	 * Attribute asQtemaxi.
	 */
	private Long asQtemaxi;
	
	/**
	 * Attribute asQtesto.
	 */
	private Long asQtesto;
	
	/**
	 * Attribute asPrincipal.
	 */
	private Short asPrincipal;
	
	/**
	 * Attribute emplacement.
	 */
	private String emplacement;

	private Integer idArticle;
	private Integer idDepot;
	
	/**
	 * <p> 
	 * </p>
	 * @return idArticledepot
	 */
	@Basic
	@Id
	@GeneratedValue
	@Column(name = "id_articledepot")
		public Integer getIdArticledepot() {
		return idArticledepot;
	}

	/**
	 * @param idArticledepot new value for idArticledepot 
	 */
	public void setIdArticledepot(Integer idArticledepot) {
		this.idArticledepot = idArticledepot;
	}
	
	/**
	 * get article
	 */
	@ManyToOne(fetch=FetchType.LAZY)
	@JsonIgnore
	@JoinColumn(name = "id_article",insertable=false ,updatable=false)
	public Article getArticle() {
		return this.article;
	}
	
	/**
	 * set article
	 */
	public void setArticle(Article article) {
		this.article = article;
	}

	/**
	 * get depot
	 */
	@ManyToOne(fetch=FetchType.LAZY)
	@JsonIgnore
	@JoinColumn(name = "id_depot",insertable=false ,updatable=false)
	public Depot getDepot() {
		return this.depot;
	}
	
	/**
	 * set depot
	 */
	public void setDepot(Depot depot) {
		this.depot = depot;
	}

	/**
	 * <p> 
	 * </p>
	 * @return asQtemini
	 */
	@Basic
	@Column(name = "AS_QteMini")
		public Long getAsQtemini() {
		return asQtemini;
	}

	/**
	 * @param asQtemini new value for asQtemini 
	 */
	public void setAsQtemini(Long asQtemini) {
		this.asQtemini = asQtemini;
	}
	
	/**
	 * <p> 
	 * </p>
	 * @return asQtemaxi
	 */
	@Basic
	@Column(name = "AS_QteMaxi")
		public Long getAsQtemaxi() {
		return asQtemaxi;
	}

	/**
	 * @param asQtemaxi new value for asQtemaxi 
	 */
	public void setAsQtemaxi(Long asQtemaxi) {
		this.asQtemaxi = asQtemaxi;
	}
	
	/**
	 * <p> 
	 * </p>
	 * @return asQtesto
	 */
	@Basic
	@Column(name = "AS_QteSto")
		public Long getAsQtesto() {
		return asQtesto;
	}

	/**
	 * @param asQtesto new value for asQtesto 
	 */
	public void setAsQtesto(Long asQtesto) {
		this.asQtesto = asQtesto;
	}
	
	/**
	 * <p> 
	 * </p>
	 * @return asPrincipal
	 */
	@Basic
	@Column(name = "AS_Principal")
		public Short getAsPrincipal() {
		return asPrincipal;
	}

	/**
	 * @param asPrincipal new value for asPrincipal 
	 */
	public void setAsPrincipal(Short asPrincipal) {
		this.asPrincipal = asPrincipal;
	}
	
	/**
	 * <p> 
	 * </p>
	 * @return emplacement
	 */
	@Basic
	@Column(name = "emplacement", length = 255)
		public String getEmplacement() {
		return emplacement;
	}

	/**
	 * @param emplacement new value for emplacement 
	 */
	public void setEmplacement(String emplacement) {
		this.emplacement = emplacement;
	}

	public void setIdArticle(Integer idArticle) {
		this.idArticle = idArticle;
	}

	@Basic
	@Column(name = "id_article")
	public Integer getIdArticle() {
		return idArticle;
	}

	public void setIdDepot(Integer idDepot) {
		this.idDepot = idDepot;
	}

	@Basic
	@Column(name = "id_depot")
	public Integer getIdDepot() {
		return idDepot;
	}
}